import { getRequest, postRequest } from "@/lib/axios";
import {
  EXCHANGEORDER,
  EXCHANGEENTRUST,
  EXCHANGEMERCHANTRATE,
  EXCHANGEBASERATE,
  EXCHANGEMERCHANTRATESET,
  EXCHANGEMERCHANTRATEEDIT,
} from "@/config/api-constant/ExAssistant";

// 换汇订单
export const exchangeOrderApi = (param, type) => {
  return postRequest(EXCHANGEORDER, param, type);
};
// 换汇挂单
export const exchangeEntrustApi = (param, type) => {
  return postRequest(EXCHANGEENTRUST, param, type);
};

// 基础汇率
export const exchangeBaseRateApi = (param, type) => {
  return postRequest(EXCHANGEBASERATE, param, type);
};

// 商户汇率
export const exchangeMerchantRateApi = (param, type) => {
  return postRequest(EXCHANGEMERCHANTRATE, param, type);
};

// 配置商户汇率
export const exchangeMerchantRateSetApi = (param) => {
  return postRequest(EXCHANGEMERCHANTRATESET, param);
};
// 编辑商户汇率
export const exchangeMerchantRateEditApi = (param) => {
  return postRequest(EXCHANGEMERCHANTRATEEDIT, param);
};

// 换汇订单记录（新）
export const exchangeExOrderApi = (param, type) => {
  return postRequest("/exassistant/exchange/exorder", param, type);
};
